


import { baseInfo } from '@/api/index.js'

const state = {
  "base_info": {
    "maintenance_mode": false,
    "maintenance_message": "",
    "web_url": "",
    "share_url": "",
    "wallet_address": "",
    "ckb_min_number": "",
    "sol_min_number": "",
    "exchange_min_number": "",
    "withdraw_min_number": "",
    "withdraw_fee_rate": "0"
  },
  "ckb": {
    "staticRate": [],
    "directRate": "",
    "levelDiffRate": [],
    "sameLevelRate": ""
  },
  "sol": {
    "staticRate": [],
    "directRate": "",
    "levelDiffRate": [],
    "sameLevelRate": ""
  }
}
const mutations = {
  setBaseInfo(state, data) {
    // console.log(data, "setBaseInfo");
    state.base_info = data.base_info;
    state.ckb = data.ckb;
    state.sol = data.sol;
  },
}
const actions = {
  async getBaseInfo(state, data) {
    let res = await baseInfo();
    if (res.code == '200') this.commit('m_baseInfo/setBaseInfo', res.data);
  }
}
export default {
  namespaced: true,
  state,
  mutations,
  actions
}